import cv2

def identify(img):
    face = cv2.CascadeClassifier("./xml/haarcascade_frontalface_default.xml")
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

    faces = face.detectMultiScale(gray, 1.1, 5)

    for (x, y, w, h) in faces:
        cv2.rectangle(img, (x, y), (x + w, y + h), (255, 0, 0), 2)
        
    while True:
        cv2.imshow('img', img)
        key = cv2.waitKey(10)
        if key & 0xFF == ord('q'):
            cv2.destroyAllWindows()
            break
